<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of CMS_Controller
 *
 * @author Lucas Pinheiro
 */
require APPPATH . "third_party/MX/Controller.php";
class CMS_Controller extends MX_Controller {

    //put your code here
    protected $usuario = array();

    public function __construct() {
        parent::__construct();
        $this->load->library('tank_auth');

        function index() {
            if (!$this->tank_auth->get_user_id()) {
                redirect(base_cms());
            } else {
                $this->usuario->user_id = $this->tank_auth->get_user_id();
                $this->usuario->username = $this->tank_auth->get_username();
            }
        }

    }

}

?>
